@import 'colors';

.outline-reader {
  &__close {
    display: none;
  }

  &__title {
    margin: 0.67em 0 !important;
    text-align: center !important;
    font-family: 'Microsoft YaHei UI', Arial, sans-serif;
    font-weight: normal;
    overflow: hidden;
  }

  &_hidden {
    display: none !important;

    &.outline-reader_sibling {
      display: none !important;

      &.wrapper {
        &.post {
          display: none;
        }
      }
    }
  }

  &--reading {
    display: block;
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 3em 4em;
    background-color: @white;
    overflow: auto;

    .outline-reader {
      &__close {
        .shadow_light_regular();
        display: block;
        position: fixed;
        z-index: 3;
        top: 50%;
        right: 22px;
        margin: 0;
        width: 36px;
        height: 36px;
        border-radius: 18px;
        border: 1px solid @primary_border_color;
        line-height: 30px;
        text-align: center;
        transform: translateY(-50%);
        cursor: pointer;
        box-shadow: 0 0 8px @secondary_border_color;
        color: @fourth_text_color;
        background-color: @white;
        overflow: hidden;

        &:hover {
          background-color: @success_color;
          color: @white;
        }
      }

      h1,
      &__title {
        margin: 0.67em 0 !important;
        line-height: 1.3em;
        font-size: 3.5em;
      }
    }
  }
}

@media (max-width: 480px) {
  .outline-reader--reading {
    padding: 0 1.25em;

    .outline-reader {
      &__close {
        top: 24px;
        right: 12px;
        width: 22px;
        height: 22px;
        line-height: 22px;
        border-radius: 11px;
        opacity: 0.8;
      }

      &__title {
        font-size: 2em;
      }
    }
  }
}

@media print {
  html,
  body {
    height: initial !important;
  }

  .outline-reader {
    display: block !important;
    overflow: hidden;

    h1,
    &__title {
      margin: 13.4pt 0 28pt !important;
      text-align: center !important;
      font-size: 20pt !important;
    }

    &.outline-reader--reading {
      position: relative !important;
      height: auto !important;
      padding: 0 !important;
      overflow: hidden !important;

      .outline-reader {
        h1,
        &__title {
          margin: 13.4pt 0 28pt !important;
          text-align: center !important;
          font-size: 20pt !important;
        }

        &__close {
          display: none !important;
        }
      }
    }

    pre {
      padding: 1em !important;
      border: 1px solid @border_color !important;
      border-radius: 4px !important;
    }

    pre,
    code {
      background-color: @white !important;
    }

    table,
    img,
    svg {
      break-inside: avoid;
    }

    &_sibling {
      display: none !important;
    }
  }
}
